﻿using Model.BusinessModel.InPut;
using Model.BusinessModel.OutPut;
using Model.DomainModel;

namespace Infrastructure.IRepository
{
    /// <summary>
    /// 流程仓储接口
    /// </summary>
    public interface IFlowRepository : IRepository<Flow>
    {
        /// <summary>
        /// 根据流程名称获取数据
        /// </summary>
        /// <param name="flowName">流程名称</param>
        /// <returns></returns>
        Flow? GetFlowByFlowName(string flowName);

        /// <summary>
        /// 根据流程id获取数据
        /// </summary>
        /// <param name="flowId">流程id</param>
        /// <returns></returns>
        FlowOrFormOutPut? GetFlowByFlowId(string flowId);

        /// <summary>
        /// 更新数据状态
        /// </summary>
        /// <param name="input">输入模型</param>
        /// <returns></returns>
        void UpdateFlowDataState(UpdateDataStateInput input);

        /// <summary>
        /// 获取所有流程
        /// </summary>
        /// <returns></returns>
        List<Flow> GetAllFlow();

        /// <summary>
        /// 根据表单ID,获取流程
        /// </summary>
        /// <param name="formId">表单id</param>
        /// <returns></returns>
        List<Flow> GetFlowByFormId(string formId);
    }
}
